// import TableFilterMixin from '@/mixins/TableFilterMixin'
import { Component } from 'vue-facing-decorator'
import Render from '@/render/Render'
import toNative from '@/utils/toNative'
import TableRender from '@/render/TableRender'
import { getMonthStartData } from '@/api/finance/index'

@Component
export class MonthBeginningView extends TableRender {
    filterConfig(){
        return {
            month: {
                // 投保导出用
                name: '月份',
                element: 'datetime',
                type: 'month',
                value: '2024-03',
                params: {
                    valueFormat: 'YYYY-MM'
                }
            },
        }
    }
    renderPager() { 
        return <></>
    }
    renderVxePager() { 
        return <></>
    }

    async onLoadData(page: number, size: number, filters: { month: string }) {
        console.log(page, size, filters, '数据onLoadData')
        return getMonthStartData({
            month: filters.month
        })
    }
	
    render() {
        return super.render()
    }
}

export default toNative<{}, {}>(MonthBeginningView)